import { Dispatch, SetStateAction } from 'react';

export interface FieldsGoodsItem {
  id: number | string;
  field: string;
  name: string;
  price: number;
  address: string;
  star: number;
  score: number;
  defaultPrice: number;
  cityName: string;
  createTime: Date;
  updateTime: Date;
  recom: string;
  keywords: string;
  description: string;
  ticketInfo: string;
  img: string;
  banners: string[];
}

export type TableFieldsGoodsItem = Omit<
  FieldsGoodsItem,
  'banners' | 'ticketInfo' | 'description'
>;

export interface FieldsGoodsListOptions {
  page: number;
  pageSize: number;
  keyword: string;
}

export interface TableColumnsOptions {
  handleItemNameClick: (row: TableFieldsGoodsItem) => Promise<void>;
  handleEditClick: (row: TableFieldsGoodsItem) => Promise<void>;
  handleDeleteClick: (row: TableFieldsGoodsItem) => Promise<void>;
}

export interface CurrentRowHookOptions {
  refresh: () => Promise<void>;
  setLoading: Dispatch<SetStateAction<boolean>>;
}
